

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>mindspore.ops.composite.random_ops &mdash; MindSpore master documentation</title>
  

  
  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
        <script src="../../../../_static/jquery.js"></script>
        <script src="../../../../_static/underscore.js"></script>
        <script src="../../../../_static/doctools.js"></script>
        <script src="../../../../_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../../genindex.html" />
    <link rel="search" title="Search" href="../../../../search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../../../index.html" class="icon icon-home"> MindSpore
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">MindSpore Python API</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.html">mindspore</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.common.initializer.html">mindspore.common.initializer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.communication.html">mindspore.communication</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.compression.html">mindspore.compression</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.context.html">mindspore.context</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.dataset.html">mindspore.dataset</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.dataset.audio.html">mindspore.dataset.audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.dataset.config.html">mindspore.dataset.config</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.dataset.text.html">mindspore.dataset.text</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.dataset.transforms.html">mindspore.dataset.transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.dataset.vision.html">mindspore.dataset.vision</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.mindrecord.html">mindspore.mindrecord</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.nn.html">mindspore.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.nn.probability.html">mindspore.nn.probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.nn.transformer.html">mindspore.nn.transformer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.numpy.html">mindspore.numpy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.ops.html">mindspore.ops</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.parallel.html">mindspore.parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.parallel.nn.html">mindspore.parallel.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.profiler.html">mindspore.profiler</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.scipy.html">mindspore.scipy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.train.html">mindspore.train</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../../api_python/mindspore.boost.html">mindspore.boost</a></li>
</ul>
<p class="caption"><span class="caption-text">MindSpore C++ API</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://www.mindspore.cn/lite/api/zh-CN/master/api_cpp/mindspore.html">MindSpore Lite↗</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../../index.html">MindSpore</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../../index.html" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../../../index.html">Module code</a> &raquo;</li>
        
      <li>mindspore.ops.composite.random_ops</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <h1>Source code for mindspore.ops.composite.random_ops</h1><div class="highlight"><pre>
<span></span><span class="c1"># Copyright 2020 Huawei Technologies Co., Ltd</span>
<span class="c1">#</span>
<span class="c1"># Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span>
<span class="c1"># you may not use this file except in compliance with the License.</span>
<span class="c1"># You may obtain a copy of the License at</span>
<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing, software</span>
<span class="c1"># distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span>
<span class="c1"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<span class="c1"># See the License for the specific language governing permissions and</span>
<span class="c1"># limitations under the License.</span>
<span class="c1"># ============================================================================</span>
<span class="sd">&quot;&quot;&quot;Operations for random number generators.&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">mindspore.ops.primitive</span> <span class="kn">import</span> <span class="n">constexpr</span>
<span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">operations</span> <span class="k">as</span> <span class="n">P</span>
<span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">functional</span> <span class="k">as</span> <span class="n">F</span>
<span class="kn">from</span> <span class="nn">.multitype_ops</span> <span class="kn">import</span> <span class="n">_constexpr_utils</span> <span class="k">as</span> <span class="n">const_utils</span>
<span class="kn">from</span> <span class="nn">...common</span> <span class="kn">import</span> <span class="n">dtype</span> <span class="k">as</span> <span class="n">mstype</span>
<span class="kn">from</span> <span class="nn">...common.seed</span> <span class="kn">import</span> <span class="n">_get_graph_seed</span>


<span class="nd">@constexpr</span>
<span class="k">def</span> <span class="nf">_get_seed</span><span class="p">(</span><span class="n">op_seed</span><span class="p">,</span> <span class="n">kernel_name</span><span class="p">):</span>
    <span class="s2">&quot;Get the graph-level seed.&quot;</span>
    <span class="k">return</span> <span class="n">_get_graph_seed</span><span class="p">(</span><span class="n">op_seed</span><span class="p">,</span> <span class="n">kernel_name</span><span class="p">)</span>


<div class="viewcode-block" id="normal"><a class="viewcode-back" href="../../../../api_python/ops/mindspore.ops.normal.html#mindspore.ops.normal">[docs]</a><span class="k">def</span> <span class="nf">normal</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span> <span class="n">mean</span><span class="p">,</span> <span class="n">stddev</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Generates random numbers according to the Normal (or Gaussian) random number distribution.</span>

<span class="sd">    Args:</span>
<span class="sd">        shape (tuple): The shape of random tensor to be generated.</span>
<span class="sd">          The format is :math:`(N,*)` where :math:`*` means, any number of additional dimensions.</span>
<span class="sd">        mean (Tensor): The mean μ distribution parameter, which specifies the location of the peak,</span>
<span class="sd">          with data type in [int8, int16, int32, int64, float16, float32].</span>
<span class="sd">        stddev (Tensor): The deviation σ distribution parameter. It should be greater than 0,</span>
<span class="sd">          with data type in [int8, int16, int32, int64, float16, float32].</span>
<span class="sd">        seed (int): Seed is used as entropy source for the Random number engines to generate pseudo-random numbers.</span>
<span class="sd">          The value must be non-negative. Default: None, which will be treated as 0.</span>

<span class="sd">    Returns:</span>
<span class="sd">        Tensor. The shape should be equal to the broadcasted shape between the input `shape` and shapes</span>
<span class="sd">        of `mean` and `stddev`.</span>
<span class="sd">        The dtype is float32.</span>

<span class="sd">    Supported Platforms:</span>
<span class="sd">        ``Ascend`` ``GPU`` ``CPU``</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore import Tensor, ops</span>
<span class="sd">        &gt;&gt;&gt; import mindspore</span>
<span class="sd">        &gt;&gt;&gt; shape = (3, 1, 2)</span>
<span class="sd">        &gt;&gt;&gt; mean = Tensor(np.array([[3, 4], [5, 6]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; stddev = Tensor(1.0, mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.normal(shape, mean, stddev, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(result)</span>
<span class="sd">        (3, 2, 2)</span>
<span class="sd">        &gt;&gt;&gt; shape = (3, 1, 3)</span>
<span class="sd">        &gt;&gt;&gt; mean = Tensor(np.array([[3, 4, 3], [3, 5, 6]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; stddev = Tensor(1.0, mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.normal(shape, mean, stddev, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(result)</span>
<span class="sd">        (3, 2, 3)</span>
<span class="sd">        &gt;&gt;&gt; shape = (3, 1, 3)</span>
<span class="sd">        &gt;&gt;&gt; mean = Tensor(np.array([[1, 2, 3], [3, 4, 3], [3, 5, 6]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; stddev = Tensor(1.0, mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.normal(shape, mean, stddev, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(result)</span>
<span class="sd">        (3, 3, 3)</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">mean_dtype</span> <span class="o">=</span> <span class="n">F</span><span class="o">.</span><span class="n">dtype</span><span class="p">(</span><span class="n">mean</span><span class="p">)</span>
    <span class="n">stddev_dtype</span> <span class="o">=</span> <span class="n">F</span><span class="o">.</span><span class="n">dtype</span><span class="p">(</span><span class="n">stddev</span><span class="p">)</span>
    <span class="n">const_utils</span><span class="o">.</span><span class="n">check_type_valid</span><span class="p">(</span><span class="n">mean_dtype</span><span class="p">,</span> <span class="n">mstype</span><span class="o">.</span><span class="n">int_type</span> <span class="o">+</span> <span class="p">(</span><span class="n">mstype</span><span class="o">.</span><span class="n">float16</span><span class="p">,</span> <span class="n">mstype</span><span class="o">.</span><span class="n">float32</span><span class="p">),</span> <span class="s1">&#39;normal&#39;</span><span class="p">)</span>
    <span class="n">const_utils</span><span class="o">.</span><span class="n">check_type_valid</span><span class="p">(</span><span class="n">stddev_dtype</span><span class="p">,</span> <span class="n">mstype</span><span class="o">.</span><span class="n">int_type</span> <span class="o">+</span> <span class="p">(</span><span class="n">mstype</span><span class="o">.</span><span class="n">float16</span><span class="p">,</span> <span class="n">mstype</span><span class="o">.</span><span class="n">float32</span><span class="p">),</span> <span class="s1">&#39;normal&#39;</span><span class="p">)</span>
    <span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span> <span class="o">=</span> <span class="n">_get_seed</span><span class="p">(</span><span class="n">seed</span><span class="p">,</span> <span class="s2">&quot;normal&quot;</span><span class="p">)</span>
    <span class="n">stdnormal</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">StandardNormal</span><span class="p">(</span><span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span><span class="p">)</span>
    <span class="n">random_normal</span> <span class="o">=</span> <span class="n">stdnormal</span><span class="p">(</span><span class="n">shape</span><span class="p">)</span>
    <span class="n">value</span> <span class="o">=</span> <span class="n">random_normal</span> <span class="o">*</span> <span class="n">stddev</span> <span class="o">+</span> <span class="n">mean</span>
    <span class="k">return</span> <span class="n">value</span></div>


<div class="viewcode-block" id="laplace"><a class="viewcode-back" href="../../../../api_python/ops/mindspore.ops.laplace.html#mindspore.ops.laplace">[docs]</a><span class="k">def</span> <span class="nf">laplace</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span> <span class="n">mean</span><span class="p">,</span> <span class="n">lambda_param</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Generates random numbers according to the Laplace random number distribution.</span>
<span class="sd">    It is defined as:</span>

<span class="sd">    .. math::</span>
<span class="sd">        \text{f}(x;μ,λ) = \frac{1}{2λ}\exp(-\frac{|x-μ|}{λ}),</span>

<span class="sd">    Args:</span>
<span class="sd">        shape (tuple): The shape of random tensor to be generated.</span>
<span class="sd">          The format is :math:`(N,*)` where :math:`*` means, any number of additional dimensions.</span>
<span class="sd">        mean (Tensor): The mean μ distribution parameter, which specifies the location of the peak.</span>
<span class="sd">          With float32 data type.</span>
<span class="sd">        lambda_param (Tensor): The parameter used for controlling the variance of this random distribution. The</span>
<span class="sd">          variance of Laplace distribution is equal to twice the square of lambda_param. With float32 data type.</span>
<span class="sd">        seed (int): Seed is used as entropy source for Random number engines generating pseudo-random numbers.</span>
<span class="sd">          Default: None, which will be treated as 0.</span>

<span class="sd">    Returns:</span>
<span class="sd">        Tensor. The shape should be the broadcasted shape of input `shape` and shapes of `mean` and `lambda_param`.</span>
<span class="sd">        The dtype is float32.</span>

<span class="sd">    Supported Platforms:</span>
<span class="sd">        ``Ascend``</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; import mindspore</span>
<span class="sd">        &gt;&gt;&gt; from mindspore import Tensor</span>
<span class="sd">        &gt;&gt;&gt; from mindspore import ops as ops</span>
<span class="sd">        &gt;&gt;&gt; shape = (2, 3)</span>
<span class="sd">        &gt;&gt;&gt; mean = Tensor(1.0, mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; lambda_param = Tensor(1.0, mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.laplace(shape, mean, lambda_param, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; print(output.shape)</span>
<span class="sd">        (2, 3)</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">mean_dtype</span> <span class="o">=</span> <span class="n">F</span><span class="o">.</span><span class="n">dtype</span><span class="p">(</span><span class="n">mean</span><span class="p">)</span>
    <span class="n">lambda_param_dtype</span> <span class="o">=</span> <span class="n">F</span><span class="o">.</span><span class="n">dtype</span><span class="p">(</span><span class="n">lambda_param</span><span class="p">)</span>
    <span class="n">const_utils</span><span class="o">.</span><span class="n">check_tensors_dtype_same</span><span class="p">(</span><span class="n">mean_dtype</span><span class="p">,</span> <span class="n">mstype</span><span class="o">.</span><span class="n">float32</span><span class="p">,</span> <span class="s2">&quot;laplace&quot;</span><span class="p">)</span>
    <span class="n">const_utils</span><span class="o">.</span><span class="n">check_tensors_dtype_same</span><span class="p">(</span><span class="n">lambda_param_dtype</span><span class="p">,</span> <span class="n">mstype</span><span class="o">.</span><span class="n">float32</span><span class="p">,</span> <span class="s2">&quot;laplace&quot;</span><span class="p">)</span>
    <span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span> <span class="o">=</span> <span class="n">_get_seed</span><span class="p">(</span><span class="n">seed</span><span class="p">,</span> <span class="s2">&quot;laplace&quot;</span><span class="p">)</span>
    <span class="n">stdlaplace</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">StandardLaplace</span><span class="p">(</span><span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span><span class="p">)</span>
    <span class="n">rnd</span> <span class="o">=</span> <span class="n">stdlaplace</span><span class="p">(</span><span class="n">shape</span><span class="p">)</span>
    <span class="n">value</span> <span class="o">=</span> <span class="n">rnd</span> <span class="o">*</span> <span class="n">lambda_param</span> <span class="o">+</span> <span class="n">mean</span>
    <span class="k">return</span> <span class="n">value</span></div>


<div class="viewcode-block" id="uniform"><a class="viewcode-back" href="../../../../api_python/ops/mindspore.ops.uniform.html#mindspore.ops.uniform">[docs]</a><span class="k">def</span> <span class="nf">uniform</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span> <span class="n">minval</span><span class="p">,</span> <span class="n">maxval</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">mstype</span><span class="o">.</span><span class="n">float32</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Generates random numbers according to the Uniform random number distribution.</span>

<span class="sd">    Note:</span>
<span class="sd">        The number in tensor minval should be strictly less than maxval at any position after broadcasting.</span>

<span class="sd">    Args:</span>
<span class="sd">        shape (tuple): The shape of random tensor to be generated.</span>
<span class="sd">          The format is :math:`(N,*)` where :math:`*` means, any number of additional dimensions</span>
<span class="sd">          and the length of :math:`(N,*)` should be less than 8 in broadcast operation.</span>
<span class="sd">        minval (Tensor): The distribution parameter `a`.</span>
<span class="sd">          It defines the minimum possible generated value, with int32 or float32 data type.</span>
<span class="sd">          If dtype is int32, only one number is allowed.</span>
<span class="sd">        maxval (Tensor): The distribution parameter `b`.</span>
<span class="sd">          It defines the maximum possible generated value, with int32 or float32 data type.</span>
<span class="sd">          If dtype is int32, only one number is allowed.</span>
<span class="sd">        seed (int): Seed is used as entropy source for the random number engines to generate pseudo-random numbers,</span>
<span class="sd">          must be non-negative. Default: None, which will be treated as 0.</span>
<span class="sd">        dtype (mindspore.dtype): Type of the Uniform distribution. If it is int32, it generates numbers from discrete</span>
<span class="sd">          uniform distribution; if it is float32, it generates numbers from continuous uniform distribution. It only</span>
<span class="sd">          supports these two data types. Default: mindspore.float32.</span>

<span class="sd">    Returns:</span>
<span class="sd">        Tensor. The shape should be equal to the broadcasted shape between the input `shape` and shapes</span>
<span class="sd">        of `minval` and `maxval`.</span>
<span class="sd">        The dtype is designated as the input `dtype`.</span>

<span class="sd">    Raises:</span>
<span class="sd">        TypeError: If `shape` is not tuple.</span>
<span class="sd">        TypeError: If &#39;minval&#39; or &#39;maxval&#39; is neither int32 nor float32</span>
<span class="sd">            and dtype of &#39;minval&#39; is not the same as &#39;maxval&#39;.</span>
<span class="sd">        TypeError: If `seed` is not an int.</span>
<span class="sd">        TypeError: If &#39;dtype&#39; is neither int32 nor float32.</span>

<span class="sd">    Supported Platforms:</span>
<span class="sd">        ``Ascend`` ``GPU``</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore import Tensor, ops</span>
<span class="sd">        &gt;&gt;&gt; import mindspore</span>
<span class="sd">        &gt;&gt;&gt; import numpy as np</span>
<span class="sd">        &gt;&gt;&gt; # For discrete uniform distribution, only one number is allowed for both minval and maxval:</span>
<span class="sd">        &gt;&gt;&gt; shape = (4, 2)</span>
<span class="sd">        &gt;&gt;&gt; minval = Tensor(1, mindspore.int32)</span>
<span class="sd">        &gt;&gt;&gt; maxval = Tensor(2, mindspore.int32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.uniform(shape, minval, maxval, seed=5, dtype=mindspore.int32)</span>
<span class="sd">        &gt;&gt;&gt;</span>
<span class="sd">        &gt;&gt;&gt; # For continuous uniform distribution, minval and maxval can be multi-dimentional:</span>
<span class="sd">        &gt;&gt;&gt; shape = (3, 1, 2)</span>
<span class="sd">        &gt;&gt;&gt; minval = Tensor(np.array([[3, 4], [5, 6]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; maxval = Tensor([8.0, 10.0], mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.uniform(shape, minval, maxval, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(result)</span>
<span class="sd">        (3, 2, 2)</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">minval_dtype</span> <span class="o">=</span> <span class="n">F</span><span class="o">.</span><span class="n">dtype</span><span class="p">(</span><span class="n">minval</span><span class="p">)</span>
    <span class="n">maxval_dtype</span> <span class="o">=</span> <span class="n">F</span><span class="o">.</span><span class="n">dtype</span><span class="p">(</span><span class="n">maxval</span><span class="p">)</span>
    <span class="n">const_utils</span><span class="o">.</span><span class="n">check_type_valid</span><span class="p">(</span><span class="n">dtype</span><span class="p">,</span> <span class="p">[</span><span class="n">mstype</span><span class="o">.</span><span class="n">int32</span><span class="p">,</span> <span class="n">mstype</span><span class="o">.</span><span class="n">float32</span><span class="p">],</span> <span class="s1">&#39;uniform&#39;</span><span class="p">)</span>
    <span class="n">const_utils</span><span class="o">.</span><span class="n">check_tensors_dtype_same</span><span class="p">(</span><span class="n">minval_dtype</span><span class="p">,</span> <span class="n">dtype</span><span class="p">,</span> <span class="s2">&quot;uniform&quot;</span><span class="p">)</span>
    <span class="n">const_utils</span><span class="o">.</span><span class="n">check_tensors_dtype_same</span><span class="p">(</span><span class="n">maxval_dtype</span><span class="p">,</span> <span class="n">dtype</span><span class="p">,</span> <span class="s2">&quot;uniform&quot;</span><span class="p">)</span>
    <span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span> <span class="o">=</span> <span class="n">_get_seed</span><span class="p">(</span><span class="n">seed</span><span class="p">,</span> <span class="s2">&quot;uniform&quot;</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">const_utils</span><span class="o">.</span><span class="n">is_same_type</span><span class="p">(</span><span class="n">dtype</span><span class="p">,</span> <span class="n">mstype</span><span class="o">.</span><span class="n">int32</span><span class="p">):</span>
        <span class="n">random_uniform</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">UniformInt</span><span class="p">(</span><span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span><span class="p">)</span>
        <span class="n">value</span> <span class="o">=</span> <span class="n">random_uniform</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span> <span class="n">minval</span><span class="p">,</span> <span class="n">maxval</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="n">uniform_real</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">UniformReal</span><span class="p">(</span><span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span><span class="p">)</span>
        <span class="n">random_uniform</span> <span class="o">=</span> <span class="n">uniform_real</span><span class="p">(</span><span class="n">shape</span><span class="p">)</span>
        <span class="n">value</span> <span class="o">=</span> <span class="n">random_uniform</span> <span class="o">*</span> <span class="p">(</span><span class="n">maxval</span> <span class="o">-</span> <span class="n">minval</span><span class="p">)</span> <span class="o">+</span> <span class="n">minval</span>
    <span class="k">return</span> <span class="n">value</span></div>


<div class="viewcode-block" id="gamma"><a class="viewcode-back" href="../../../../api_python/ops/mindspore.ops.gamma.html#mindspore.ops.gamma">[docs]</a><span class="k">def</span> <span class="nf">gamma</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span> <span class="n">alpha</span><span class="p">,</span> <span class="n">beta</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Generates random numbers according to the Gamma random number distribution.</span>

<span class="sd">    Args:</span>
<span class="sd">        shape (tuple): The shape of random tensor to be generated.</span>
<span class="sd">          The format is :math:`(N,*)` where :math:`*` means, any number of additional dimensions.</span>
<span class="sd">        alpha (Tensor): The alpha α distribution parameter. It should be greater than 0 with float32 data type.</span>
<span class="sd">        beta (Tensor): The beta β distribution parameter. It should be greater than 0 with float32 data type.</span>
<span class="sd">        seed (int): Seed is used as entropy source for the random number engines to generate</span>
<span class="sd">          pseudo-random numbers, must be non-negative. Default: None, which will be treated as 0.</span>

<span class="sd">    Returns:</span>
<span class="sd">        Tensor. The shape should be equal to the broadcasted shape between the input `shape` and shapes</span>
<span class="sd">        of `alpha` and `beta`.</span>
<span class="sd">        The dtype is float32.</span>

<span class="sd">    Raises:</span>
<span class="sd">        TypeError: If `shape` is not a tuple.</span>
<span class="sd">        TypeError: If neither `alpha` nor `beta` is a Tensor.</span>
<span class="sd">        TypeError: If `seed` is not an int.</span>
<span class="sd">        TypeError: If dtype of `alpha` and `beta` is not float32.</span>

<span class="sd">    Supported Platforms:</span>
<span class="sd">        ``Ascend``</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore import Tensor, ops</span>
<span class="sd">        &gt;&gt;&gt; import mindspore</span>
<span class="sd">        &gt;&gt;&gt; # case 1: alpha_shape is (2, 2)</span>
<span class="sd">        &gt;&gt;&gt; shape = (3, 1, 2)</span>
<span class="sd">        &gt;&gt;&gt; alpha = Tensor(np.array([[3, 4], [5, 6]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; beta = Tensor(np.array([1.0]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.gamma(shape, alpha, beta, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(result)</span>
<span class="sd">        (3, 2, 2)</span>
<span class="sd">        &gt;&gt;&gt; # case 2: alpha_shape is (2, 3), so shape is (3, 1, 3)</span>
<span class="sd">        &gt;&gt;&gt; shape = (3, 1, 3)</span>
<span class="sd">        &gt;&gt;&gt; alpha = Tensor(np.array([[1, 3, 4], [2, 5, 6]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; beta = Tensor(np.array([1.0]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.gamma(shape, alpha, beta, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(result)</span>
<span class="sd">        (3, 2, 3)</span>
<span class="sd">        &gt;&gt;&gt; # case 3: beta_shape is (1, 2), the output is different.</span>
<span class="sd">        &gt;&gt;&gt; shape = (3, 1, 2)</span>
<span class="sd">        &gt;&gt;&gt; alpha = Tensor(np.array([[3, 4], [5, 6]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; beta = Tensor(np.array([1.0, 2]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.gamma(shape, alpha, beta, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(output)</span>
<span class="sd">        [[[ 2.2132034  5.8855834]]</span>
<span class="sd">         [ 3.3981476  7.5805717]</span>
<span class="sd">        [[ 3.3981476  7.5805717]]</span>
<span class="sd">         [ 3.7190282 19.941492]</span>
<span class="sd">        [[ 2.9512358  2.5969937]]</span>
<span class="sd">         [ 3.786061   5.160872 ]]]</span>
<span class="sd">        &gt;&gt;&gt; # case 4: beta_shape is (2, 1), the output is different.</span>
<span class="sd">        &gt;&gt;&gt; shape = (3, 1, 2)</span>
<span class="sd">        &gt;&gt;&gt; alpha = Tensor(np.array([[3, 4], [5, 6]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; beta = Tensor(np.array([[1.0], [2.0]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.gamma(shape, alpha, beta, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(output)</span>
<span class="sd">        [[[ 5.6085486  7.8280783]]</span>
<span class="sd">         [ 15.97684  16.116285]</span>
<span class="sd">        [[ 1.8347423  1.713663]]</span>
<span class="sd">         [ 3.2434065 15.667398]</span>
<span class="sd">        [[ 4.2922077  7.3365674]]</span>
<span class="sd">         [ 5.3876944  13.159832 ]]]</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span> <span class="o">=</span> <span class="n">_get_seed</span><span class="p">(</span><span class="n">seed</span><span class="p">,</span> <span class="s2">&quot;gamma&quot;</span><span class="p">)</span>
    <span class="n">random_gamma</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">Gamma</span><span class="p">(</span><span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span><span class="p">)</span>
    <span class="n">value</span> <span class="o">=</span> <span class="n">random_gamma</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span> <span class="n">alpha</span><span class="p">,</span> <span class="n">beta</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">value</span></div>


<div class="viewcode-block" id="poisson"><a class="viewcode-back" href="../../../../api_python/ops/mindspore.ops.poisson.html#mindspore.ops.poisson">[docs]</a><span class="k">def</span> <span class="nf">poisson</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span> <span class="n">mean</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Generates random numbers according to the Poisson random number distribution.</span>

<span class="sd">    .. math::</span>

<span class="sd">        \text{P}(i|μ) = \frac{\exp(-μ)μ^{i}}{i!}</span>

<span class="sd">    Args:</span>
<span class="sd">        shape (tuple): The shape of random tensor to be generated.</span>
<span class="sd">          The format is :math:`(N,*)` where :math:`*` means, any number of additional dimensions.</span>
<span class="sd">        mean (Tensor): The mean μ distribution parameter. It should be greater than 0 with float32 data type.</span>
<span class="sd">        seed (int): Seed is used as entropy source for the random number engines to generate pseudo-random numbers</span>
<span class="sd">          and must be non-negative. Default: None, which will be treated as 0.</span>

<span class="sd">    Returns:</span>
<span class="sd">        Tensor. The shape should be equal to the broadcasted shape between the input &quot;shape&quot; and shapes of `mean`.</span>
<span class="sd">        The dtype is float32.</span>

<span class="sd">    Raises:</span>
<span class="sd">        TypeError: If `shape` is not a tuple.</span>
<span class="sd">        TypeError: If `mean` is not a Tensor whose dtype is not float32.</span>
<span class="sd">        TypeError: If `seed` is not an int.</span>

<span class="sd">    Supported Platforms:</span>
<span class="sd">        ``Ascend``</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore import Tensor, ops</span>
<span class="sd">        &gt;&gt;&gt; import mindspore</span>
<span class="sd">        &gt;&gt;&gt; # case 1: It can be broadcast.</span>
<span class="sd">        &gt;&gt;&gt; shape = (4, 1)</span>
<span class="sd">        &gt;&gt;&gt; mean = Tensor(np.array([5.0, 10.0]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.poisson(shape, mean, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(result)</span>
<span class="sd">        (4, 2)</span>
<span class="sd">        &gt;&gt;&gt; # case 2: It can not be broadcast. It is recommended to use the same shape.</span>
<span class="sd">        &gt;&gt;&gt; shape = (2, 2)</span>
<span class="sd">        &gt;&gt;&gt; mean = Tensor(np.array([[5.0, 10.0], [5.0, 1.0]]), mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.poisson(shape, mean, seed=5)</span>
<span class="sd">        &gt;&gt;&gt; result = output.shape</span>
<span class="sd">        &gt;&gt;&gt; print(result)</span>
<span class="sd">        (2, 2)</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span> <span class="o">=</span> <span class="n">_get_seed</span><span class="p">(</span><span class="n">seed</span><span class="p">,</span> <span class="s2">&quot;poisson&quot;</span><span class="p">)</span>
    <span class="n">random_poisson</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">Poisson</span><span class="p">(</span><span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span><span class="p">)</span>
    <span class="n">value</span> <span class="o">=</span> <span class="n">random_poisson</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span> <span class="n">mean</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">value</span></div>


<div class="viewcode-block" id="multinomial"><a class="viewcode-back" href="../../../../api_python/ops/mindspore.ops.multinomial.html#mindspore.ops.multinomial">[docs]</a><span class="k">def</span> <span class="nf">multinomial</span><span class="p">(</span><span class="n">inputs</span><span class="p">,</span> <span class="n">num_sample</span><span class="p">,</span> <span class="n">replacement</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Returns a tensor sampled from the multinomial probability distribution located in the corresponding</span>
<span class="sd">    row of the input tensor.</span>

<span class="sd">    Note:</span>
<span class="sd">        The rows of input do not need to sum to one (in which case we use the values as weights),</span>
<span class="sd">        but must be non-negative, finite and have a non-zero sum.</span>

<span class="sd">    Args:</span>
<span class="sd">        inputs (Tensor): The input tensor containing probabilities, must be 1 or 2 dimensions, with</span>
<span class="sd">          float32 data type.</span>
<span class="sd">        num_sample (int): Number of samples to draw.</span>
<span class="sd">        replacement (bool, optional): Whether to draw with replacement or not, default True.</span>
<span class="sd">        seed (int, optional): Seed is used as entropy source for the random number engines to generate</span>
<span class="sd">          pseudo-random numbers, must be non-negative. Default: None.</span>

<span class="sd">    Outputs:</span>
<span class="sd">        Tensor, has the same rows with input. The number of sampled indices of each row is `num_samples`.</span>
<span class="sd">        The dtype is float32.</span>

<span class="sd">    Raises:</span>
<span class="sd">        TypeError: If `x` is not a Tensor whose dtype is not float32.</span>
<span class="sd">        TypeError: If `num_sample` is not an int.</span>
<span class="sd">        TypeError: If `seed` is neither an int nor an optional.</span>

<span class="sd">    Supported Platforms:</span>
<span class="sd">        ``GPU``</span>

<span class="sd">    Examples:</span>
<span class="sd">        &gt;&gt;&gt; from mindspore import Tensor, ops</span>
<span class="sd">        &gt;&gt;&gt; import mindspore</span>
<span class="sd">        &gt;&gt;&gt; # case 1: The output is random, and the length of the output is the same as num_sample.</span>
<span class="sd">        &gt;&gt;&gt; x = Tensor([0, 9, 4, 0], mindspore.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.multinomial(x, 2)</span>
<span class="sd">        &gt;&gt;&gt; # print(output)</span>
<span class="sd">        &gt;&gt;&gt; # [1 2] or [2 1]</span>
<span class="sd">        &gt;&gt;&gt; # the case where the result is [2 1] in multiple times.</span>
<span class="sd">        &gt;&gt;&gt; # This is because the value corresponding to the index 1 is larger than the value of the index 2.</span>
<span class="sd">        &gt;&gt;&gt; print(len(output))</span>
<span class="sd">        2</span>
<span class="sd">        &gt;&gt;&gt; # case 2: The output is random, and the length of the output is the same as num_sample.</span>
<span class="sd">        &gt;&gt;&gt; # replacement is False(Default).</span>
<span class="sd">        &gt;&gt;&gt; # If the extracted value is 0, the index value of 1 will be returned.</span>
<span class="sd">        &gt;&gt;&gt; x = Tensor([0, 9, 4, 0], mstype.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.multinomial(x, 4)</span>
<span class="sd">        &gt;&gt;&gt; print(output)</span>
<span class="sd">        [1 1 2 1]</span>
<span class="sd">        &gt;&gt;&gt; # case 3: The output is random, num_sample == x_length = 4, and replacement is True, Can extract the same elements。</span>
<span class="sd">        &gt;&gt;&gt; x = Tensor([0, 9, 4, 0], mstype.float32)</span>
<span class="sd">        &gt;&gt;&gt; output = ops.multinomial(x, 4, True)</span>
<span class="sd">        &gt;&gt;&gt; print(output)</span>
<span class="sd">        [1 1 2 2]</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">shape</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">Shape</span><span class="p">()</span>
    <span class="n">reshape</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">Reshape</span><span class="p">()</span>
    <span class="n">const_utils</span><span class="o">.</span><span class="n">check_valid_dim</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">shape</span><span class="p">(</span><span class="n">inputs</span><span class="p">)),</span> <span class="s2">&quot;multinomial&quot;</span><span class="p">)</span>
    <span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span> <span class="o">=</span> <span class="n">_get_seed</span><span class="p">(</span><span class="n">seed</span><span class="p">,</span> <span class="s2">&quot;multinomial&quot;</span><span class="p">)</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">replacement</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">shape</span><span class="p">(</span><span class="n">inputs</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">&lt;</span> <span class="n">num_sample</span><span class="p">:</span>
            <span class="n">const_utils</span><span class="o">.</span><span class="n">raise_value_error</span><span class="p">(</span><span class="s2">&quot;For &#39;multinomial&#39;, the &#39;num_sample&#39; must be less than &quot;</span>
                                          <span class="s2">&quot;the last dimension of input without &#39;replacement&#39;, &quot;</span>
                                          <span class="s2">&quot;but got &#39;num_sample&#39;: </span><span class="si">{}</span><span class="s2"> and &quot;</span>
                                          <span class="s2">&quot;&#39;replacement&#39;: </span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">num_sample</span><span class="p">,</span> <span class="n">replacement</span><span class="p">))</span>
        <span class="n">n_dist</span> <span class="o">=</span> <span class="mi">1</span>
        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">shape</span><span class="p">(</span><span class="n">inputs</span><span class="p">))</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
            <span class="n">n_dist</span> <span class="o">=</span> <span class="n">shape</span><span class="p">(</span><span class="n">inputs</span><span class="p">)[</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span>
        <span class="n">random_uniform</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">UniformReal</span><span class="p">(</span><span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span><span class="p">)((</span><span class="n">n_dist</span> <span class="o">*</span> <span class="n">shape</span><span class="p">(</span><span class="n">inputs</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">],))</span>
        <span class="k">if</span> <span class="n">n_dist</span> <span class="o">!=</span> <span class="mi">1</span><span class="p">:</span>
            <span class="n">random_uniform</span> <span class="o">=</span> <span class="n">reshape</span><span class="p">(</span><span class="n">random_uniform</span><span class="p">,</span> <span class="p">(</span><span class="n">n_dist</span><span class="p">,</span> <span class="n">shape</span><span class="p">(</span><span class="n">inputs</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]))</span>
        <span class="n">vals</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">RealDiv</span><span class="p">()(</span><span class="n">P</span><span class="o">.</span><span class="n">Log</span><span class="p">()(</span><span class="n">random_uniform</span><span class="p">),</span> <span class="n">inputs</span> <span class="o">+</span> <span class="mf">1e-6</span><span class="p">)</span>
        <span class="n">_</span><span class="p">,</span> <span class="n">indices</span> <span class="o">=</span> <span class="n">P</span><span class="o">.</span><span class="n">TopK</span><span class="p">()(</span><span class="n">vals</span><span class="p">,</span> <span class="n">num_sample</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">indices</span>
    <span class="k">return</span> <span class="n">P</span><span class="o">.</span><span class="n">Multinomial</span><span class="p">(</span><span class="n">seed1</span><span class="p">,</span> <span class="n">seed2</span><span class="p">)(</span><span class="n">inputs</span><span class="p">,</span> <span class="n">num_sample</span><span class="p">)</span></div>
</pre></div>

           </div>
           
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2021, MindSpore.

    </p>
  </div>
    
    
    
    Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    
    provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>